﻿USE [WarehouseManagement]
GO

/****** Object:  StoredProcedure [dbo].[GetCollectionProduct]    Script Date: 03/15/2011 00:35:15 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		duylv00360
-- Create date: 3/14/2011
-- Description:	This stored procedure use to get all product
-- =============================================
ALTER PROCEDURE [dbo].[GetCollectionProductType] 
(
@IsShowAll bit=0
)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT 
			p.ProductID
			, p.ProductCode
			, p.ProductName
			, p.[Description]
			, p.[IsDelete]
			
	FROM 
			[Product] p
	
	WHERE
			p.[IsDelete] = 0 OR p.[IsDelete] = @IsShowAll
END

GO

/*
USE WarehouseManagement
GO
EXEC [GetCollectionProductType]
*/